<%@page import="java.io.* , java.util.*, java.sql.*,  com.myapp.struts.dao.*, com.myapp.struts.beans.*"%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <title>AccountHead View</title>
        <link href="../../../../css/cms.css" rel="stylesheet" type="text/css">
        <script language="javascript">
        function Validate()
			{
			var index1=document.scheduleLevel2.schedulename.selectedIndex;                        
                        if(index1<=0)
                        {
                            alert("Please Select Schedle Name....");                            
                            document.scheduleLevel2.schedulename.focus();
                            return false;
                        }
						var index2=document.scheduleLevel2.sub1.selectedIndex;           
						if (index2<=0)
						{
							alert("Please Select Schedle Name....");                            
                            document.scheduleLevel2.sub1.focus();
                            return false;
						}
						if (document.getElementById("sub2").value=="")
						{
							alert("ENTER SUB SCHEDULE 2....");
							document.getElementById("sub2").focus();
							return false;
						}
						
						if (document.getElementById("desc").value=="")
						{
							alert("ENTER DESCRIPTION....");
							document.getElementById("desc").focus();
							return false;
						}
						return ture;
             }
		</script>
    </head>
    <body bgcolor="#D3F1D5">
        <%
        String schname=request.getParameter("sname");
        String schno=request.getParameter("schno");
        %>
        <form name='scheduleLevel2' id="scheduleLevel2" method='post' action="InsertAddSubSchedule" onSubmit="return Validate();">
            <table border='0' align='center' cellpadding="0" cellspacing="0" style="border-right: #000000 1px solid;
                   border-top: #000000 1px solid; border-left: #000000 1px solid;  border-bottom: #000000 1px solid; font-size: 9pt; color: #000000; font-family: Arial;">
                <tr>
                    <th height='29' colspan='2' align='center'>Creation of Schedule and Main Schedule</th>
              </tr>
                <tr >
                    <td >Schedule Number</td>
                    <td><input name="scheduleno" type="text" id="scheduleno" value="<%=schno%>"  maxLength=20 readonly /></td>
                </tr>
                <tr>
                    <td >Schedule name</td>
                    <td><label>
                            <select name='schedulename' id='schedulename'>
	                            <option></option>
                                <option><%=schname%></option>
                            </select>
                        </label></td>
                </tr>
                <tr >
                    <td >Sub Schedule 1</td>
                    <td><label>
                            <select name='sub1' id='sub1'>
                                <option></option>
                                <%
                                      String value="";
                                       ArrayList a2=(ArrayList)request.getAttribute("SCL");
                                      Iterator it=a2.iterator();
                                          while(it.hasNext()) {
                                          ScheduleBean sb=(ScheduleBean)it.next();
                                          value=sb.getSub_Schedule1();
                                %>
                                <option><%=value%></option>
                                <%}%>
                            </select>
                        </label></td>
                </tr>
                <tr>
                    <td width="233" >Sub Schedule 2</td>
                    <td width="296"><input name='sub2' type='text' id='sub2' /></td>
                </tr>
                <tr>
                    <td >Description</td>
                    <td><label>
                            <input name='desc' type='text' id='desc' />
                        </label></td>
                </tr>
                <tr>
                    <td colspan='2' align='center'><input name='Submit2' type='submit'   value='Submit'/></td>
                </tr>
            </table>
    </form>
    </body>
</html>
